<template>
  <div>
    <TypeNav></TypeNav>
    <ListContainer></ListContainer>
    <TodayRecommend></TodayRecommend>
    <Rank></Rank>
    <Like></Like>
    <Floor v-for="(floor,index) in floorList" :key="floor.id" :list="floor"></Floor>
    <Brand></Brand>
  </div>
</template>



<script>
import { mapState } from 'vuex'
//引入Home下的组件
import ListContainer from '@/views/Home/ListContainer'
import TodayRecommend from '@/views/Home/TodayRecommend'
import Rank from '@/views/Home/Rank'
import Like from '@/views/Home/Like'
import Floor from '@/views/Home/Floor'
import Brand from '@/views/Home/Brand'



export default {
  name: 'Home',
  components:{
    ListContainer,
    TodayRecommend,
    Rank,
    Like,
    Floor,
    Brand
  },
  mounted() {
    // 派发aciotns，获取floor 组件的数据
    this.$store.dispatch("getFloorList")

    // 派发actios 获取用户登录信息、
    // this.$store.dispatch('getUserInfo')
  },
  computed:{
    ...mapState({
      floorList:state=>state.home.floorList
    })
  },
  methods: {

  },
};
</script>

<style lang="less" scoped>

</style>